package module.main.model.dataObj
{
	public class UserInfoObj
	{
		public function UserInfoObj()
		{
		}
		
		/**
		 * 声望 
		 */
		public var prosperity:int;
		/**
		 * 繁荣度
		 */
		public var reputation:int;
		
		public var food:int;
		public var wood:int;
		public var stone:int;
		public var iron:int;
		public var gold:int;
		public var currentPopulation:int;
		public var totalPopulation:int;
		public var heapic:String;
		public var userPosition:String;
		public var userName:String;
		public var onlineTimes:String;
		public var title:String;
		public var userId:String;
		public var version:String;
		public var landLevel:int;
		public var userLevel:int;
		public var name:String;

		public static function phaseData(data:Object):UserInfoObj{
			var _userInfoObj:UserInfoObj = new UserInfoObj;
			_userInfoObj.prosperity = data.prosperity;
			_userInfoObj.reputation = data.reputation;
			_userInfoObj.food = data.food;
			_userInfoObj.wood = data.wood;
			_userInfoObj.stone = data.stone;
			_userInfoObj.gold = data.gold;
			_userInfoObj.iron = data.iron;
			_userInfoObj.currentPopulation = data.idle_population;
			_userInfoObj.userPosition = data.userPosition;
			_userInfoObj.userName = data.name;
			_userInfoObj.onlineTimes = data.online_times;
			_userInfoObj.title = data.title;
			_userInfoObj.userId = data.uid;
			_userInfoObj.version = data.version;
			_userInfoObj.landLevel = data.land_level;
			_userInfoObj.userLevel = data.user_level;
			_userInfoObj.totalPopulation = data.total_population;
			
			
			return _userInfoObj;
		}
		
		public function clone():UserInfoObj{
			var returnObj:UserInfoObj = new UserInfoObj;
			returnObj.prosperity = this.prosperity;
			returnObj.reputation = this.reputation;
			returnObj.food = this.food;
			returnObj.wood = this.wood;
			returnObj.stone = this.stone;
			returnObj.gold = this.gold;
			returnObj.iron = this.iron;
			returnObj.currentPopulation = this.currentPopulation;
			returnObj.userPosition = this.userPosition;
			returnObj.userName = this.name;
			returnObj.onlineTimes = this.onlineTimes;
			returnObj.title = this.title;
			returnObj.userId = this.userId;
			returnObj.version = this.version;
			returnObj.landLevel = this.landLevel;
			returnObj.userLevel = this.userLevel;
			returnObj.totalPopulation = this.totalPopulation;
			
			
			return returnObj;
		}
	}
}